package com.yumeko.dubbo.service.impl;

import com.yumeko.dubbo.config.RabbitmqConfig;
import com.yumeko.dubbo.pojo.User;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component
@RabbitListener(queues = RabbitmqConfig.SPRING_BOOT_QUEUE)
public class ConsumerMessageImpl {
    @RabbitHandler
    public void process(User user){
        System.out.println("姓名:"+user.getName()+"年龄:"+user.getName()+"------"+ LocalDateTime.now());
    }
}
